home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Views / Panes / RectangularPane.cp < prev    next >
Text File  |  2000-06-23  |  649b  |  35 lines

  1. // RectangularPane.cp
  2.  
  3. #ifndef RectangularPane_h
  4. #include "RectangularPane.h"
  5. #endif
  6. #ifndef Canvas_h
  7. #include "Canvas.h"
  8. #endif
  9.  
  10. RectangularPane::RectangularPane( const DrawsSpontaneously *parent )
  11.   : Pane( parent ),
  12.      bounds( Rectangle32::zero )
  13.   {
  14.   }
  15.  
  16. void RectangularPane::Adjust( Canvas& canvas ) const
  17.   {
  18.     Assert( Parent() != 0 );
  19.     canvas.Submap( bounds );
  20.   }
  21.  
  22. void RectangularPane::SetBounds( Rectangle32 newBounds )
  23.   {
  24.     Assert( Parent() != 0 );
  25.     AnnouncePaneSize( newBounds.Size() );    
  26.     bounds = newBounds;
  27.   }
  28.  
  29. void RectangularPane::Clear()
  30.   {
  31.     AcceptsSizeSuggestions::Clear();
  32.     Pane::Clear();
  33.     AcceptsConformanceToSize::Clear();
  34.   }
  35.